<?php $this->load->view('common/header'); ?>
<?php $this->load->view('common/header-common'); ?>
<section id="forgetpassword">
	<div class="container well">	
		<div class="row-fluid">
			<div class="span8 offset2">
				<form action="<?php echo site_url("/user/forgetpassword");?>" method="post" id="form-forgetpassword">
					<fieldset>
						<legend>忘记密码</legend>
						<?php if (isset($error)) {?>
							<div class="alert">
		  						<a class="close" data-dismiss="alert">×</a>
		  						<strong>错误</strong> <?php echo $error;?>
							</div>
							<?php }?>
						<div class="form-group">
							<div class="control-group">
								<label for="red_email" class="control-label">邮箱</label>
								<div class="controls">
									<input type="text" class="input-medium" value="<?php echo set_value("red_email");?>" name="red_email" id="red_email">
									<div class="help-inline"><?php echo form_error('red_email');?></div>
								</div>
							</div>
							<div class="controls-group">
								<label class="control-label" for="red_captcha">验证码</label>
								<div class="controls">
									<input type="text" class="input-medium" name="red_captcha" id="red_captcha">
									<span style="cursor:pointer"><img src="<?php echo site_url("/api/captcha")."?".rand();?>" alt="验证码" width="180" height="60" class="captcha"><p>点击图像更换验证码</p></span>
									<div class="help-block"><?php echo form_error('red_captcha');?></div>
									
								</div>
							</div>
							<div class="form-actions">
								<button type="submit" class="btn btn-primary btn-medium">下一步</button>
							</div>
						</div>
					</fieldset>
				</form>
			</div>
		</div>
	</div>
</section>
<script type="text/javascript" src="<?php echo $this->config->item('public_path');?>js/bootstrapJS/bootstrap-validation.js"></script>
<script type="text/javascript">
	$(window).load(function(){
		$('#form-forgetemail').validation();
		$(".captcha").each(function(){
			var t = $(this);
			$(this).click(function(){
				t.attr("src","<?php echo site_url("/api/captcha")."?".rand();?>");
			});
		});
	});
</script>
<?php $this->load->view('common/footer'); ?>